package com.zretc.support.service;

import com.zretc.support.entity.Message;
import com.zretc.support.entity.Online;
import org.springframework.data.domain.Page;

import java.util.Date;

public interface OnlineService {
    /**
     * 模糊+分页
     * @param keywords
     * @param page
     * @param limit
     * @return
     */
    Page<Online> selectByPage(String keywords, String senderId, String receiverId, Integer page, Integer limit);

    /**
     * 时间段查询
     * @param time1
     * @param time2
     * @param page
     * @param limit
     * @return
     */
    Page<Online> selectByDate(Date time1, Date time2, String senderId, String receiverId, Integer page, Integer limit);

    /**
     * 增加消息
     * @param online
     * @return
     */
    int addOnline(Online online);

    /**
     * 修改消息
     * @param online
     * @return
     */
    int updOnline(Online online);

    /**
     * 根据id删除单条信息
     * @param onlineId
     * @return
     */
    int delOnlById(Integer onlineId);
}
